from django.contrib import admin
from .models import Course, CourseCate

class CourseAdmin(admin.ModelAdmin):
	icon = '<i class="material-icons">school</i>'
	list_display = ('name', 'word_num', 'unit_price')
	list_filter = 'course_cate',
	search_fields = ('name', )
	readonly_fields = ('id',)

class CourseCateAdmin(admin.ModelAdmin):
	icon = '<i class="material-icons">widgets</i>'
	list_display = ('name','description','sort_no')
	list_filter = ('id',)
	readonly_fields = ('id',)

# Register your models here.
admin.site.register(Course,CourseAdmin)
admin.site.register(CourseCate,CourseCateAdmin)
